\hypertarget{nonuniform__meshes_8cpp}{
\subsection{Examples/02NonUniformMesh/nonuniform\_\-meshes.cpp File Reference}
\label{nonuniform__meshes_8cpp}\index{Examples/02NonUniformMesh/nonuniform\_\-meshes.cpp@{Examples/02NonUniformMesh/nonuniform\_\-meshes.cpp}}
}


Using the StructuredMesh$<$$>$ class with the NonUniform$<$$>$ adaptor.  




\subsubsection{Detailed Description}
\begin{DoxyAuthor}{Author}
Luis M. de la Cruz Salas \mbox{[} Tue Dec 25 16:23:06 GMT 2010 \mbox{]}
\end{DoxyAuthor}
This program presents examples for using the StructuredMesh$<$$>$ class, which is intended to handle structured meshes in Cartesian coordinates. In these examples the class is specialized with the NonUniform$<$$>$ adaptor to create non-\/uniform meshes. This class have to be used in conjuntion with mesh type adaptors: Uniform$<$$>$ or NonUniform$<$$>$ to create uniform or nonuniform meshes respectively \begin{DoxyParagraph}{Compiling and running}
Modify the variables BASE and BLITZ in the file {\ttfamily tuna-\/cfd-\/rules.in} according to your installation and then type the next commands: \begin{DoxyVerb}
    % make        
    % ./nonuniform_meshes \end{DoxyVerb}
 The file {\ttfamily input} contains: \begin{DoxyVerb}
    8  4 2  <--- Lenght in x, y and z axes respectively 
    11  9 6 <--- Number of nodes
    2       <--- Lambda factor \end{DoxyVerb}
 The results of this program are written in the {\ttfamily Data} directory.
\end{DoxyParagraph}
In this example the function distribution is implemented by means of a functor, and is defined by the next function: \[ f(\xi) = { e^{\lambda\xi} - 1 \over e^{\lambda} - 1 } \] See the next figure:  
\begin{DoxyImage}
\includegraphics[width=10cm]{f}
\caption{Point distribution function for lambda = 2}
\end{DoxyImage}


The results of this example are shown in the next images. This figures were generated with OpenDX, using the {\ttfamily mesh.net} script located in the {\ttfamily Data} directory.  
\begin{DoxyImage}
\includegraphics[width=10cm]{mesh1D}
\caption{1D Non-\/uniform mesh}
\end{DoxyImage}
  
\begin{DoxyImage}
\includegraphics[width=10cm]{mesh2D}
\caption{2D Non-\/uniform mesh}
\end{DoxyImage}
  
\begin{DoxyImage}
\includegraphics[width=10cm]{mesh3D}
\caption{3D Non-\/uniform mesh}
\end{DoxyImage}
  
\begin{DoxyImage}
\includegraphics[width=10cm]{mesh}
\caption{2D Non-\/uniform mesh variable dist.}
\end{DoxyImage}
. 

Definition in file \hyperlink{nonuniform__meshes_8cpp_source}{nonuniform\_\-meshes.cpp}.

